﻿<UserControl x:Class="BbsbWsGui.TaskTab"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate x:Key="stateItems" DataType="BbsbService.Classes.ControllableItem" >
            <StackPanel Margin="10 10 10 0" >
                <TextBlock Text="{Binding Path=Name}" />
                <TextBlock TextAlignment="Right" Text="{Binding Path=State}" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="baseItems" DataType="BbsbService.Classes.BaseItem" >
            <StackPanel Margin="10 10 10 0" Orientation="Horizontal">
                <TextBlock Text="{Binding Path=Name}" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="tasks" DataType="BbsbWebService.Tasks" >
            <StackPanel Margin="10 10 10 0" Orientation="Horizontal">
                <TextBlock Text="{Binding Path=Name}" />
                <TextBlock TextAlignment="Right" Text="{Binding Path=NextAlarm}" />
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>

    <Grid x:Name="schedulesGrid">
        <ListBox Margin="17,11,112,85" Name="tasksLst" ItemTemplate="{StaticResource tasks}" SelectionChanged="tasksLst_SelectionChanged" HorizontalContentAlignment="Stretch" />
        <Button Height="23" Margin="0,40,16,0" Name="addTaskBtn" VerticalAlignment="Top" HorizontalAlignment="Right" Width="75" Click="addTaskBtn_Click">Add</Button>
        <Button Height="23" HorizontalAlignment="Right" Margin="0,85,16,0" Name="editTaskBtn" VerticalAlignment="Top" Width="75" Click="editTaskBtn_Click">Edit</Button>
        <Button Height="23" HorizontalAlignment="Right" Margin="0,132,16,0" Name="removeTaskBtn" VerticalAlignment="Top" Width="75" Click="removeTaskBtn_Click">Remove</Button>
        <Label Content="" Height="68" HorizontalAlignment="Left" Margin="18,364,0,0" Name="taskDescription" VerticalAlignment="Top" Width="403" />
    </Grid>
</UserControl>
